import 'package:get/get.dart';
import 'package:handwrite/request/api/CommonApi.dart';

import 'state.dart';

class ShowLogic extends GetxController {
  final ShowState state = ShowState();
  @override
  void onInit() {
    super.onInit();
    getFiles();
  }

  Future<void> getFiles() async {
    try {
      state.list.addAll(await CommonApi.getFiles(Get.arguments as String));
    } catch (e) {
      print(e);
    }
  }
}
